package com.example.android.ui.home

import com.example.android.databinding.FragmentHomeBinding
import com.zxf.basic.base.VmBindingFragment
import com.zxf.basic.utils.ToastUtils

class HomeFragment : VmBindingFragment<HomeViewModel, FragmentHomeBinding>(FragmentHomeBinding::inflate) {

    override fun lazyInit() {
        vm.getArticleInfo(0).observe(viewLifecycleOwner) {
            ToastUtils.show("size=${it.size}")
        }
        vm.getBannerInfo().observe(viewLifecycleOwner) { result ->
            ToastUtils.show("banner size=${result.size}")
        }
    }

    override fun initView() {
        binding.apply {
            textHome.text = "测试"
            textHome.setOnClickListener {

            }
        }
    }

    override fun initData() {

    }
}